// TerrainEditorDoc.h : interface of the CTerrainEditorDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_TERRAINEDITORDOC_H__B8E89A77_5419_4553_8055_1318BB694A46__INCLUDED_)
#define AFX_TERRAINEDITORDOC_H__B8E89A77_5419_4553_8055_1318BB694A46__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "Heightmap.h"
#include "TerrainMesh.h"
#include "IniFile.h"
#include "Texture2D.h"
#include <vector>
using namespace std;

class CTerrainEditorDoc : public CDocument
{
protected: // create from serialization only
	CTerrainEditorDoc();
	DECLARE_DYNCREATE(CTerrainEditorDoc)

// Attributes
public:

// Operations
public:

	void CreateTerrainTexture();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CTerrainEditorDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);
	virtual BOOL OnSaveDocument(LPCTSTR lpszPathName);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CTerrainEditorDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

// Member variables
public:
	CHeightmap m_Heightmap;
	CTerrainMesh m_TerrainMesh;
	CIniFile m_IniFile;
	CTexture2D m_txtTerrain;
	vector< CImageTGA > m_imgElevation;
	bool m_bTerrainDataExists;
	bool m_b2DNewTerrainGenerated;
	bool m_b3DNewTerrainGenerated;

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CTerrainEditorDoc)
		// NOTE - the ClassWizard will add and remove member functions here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_TERRAINEDITORDOC_H__B8E89A77_5419_4553_8055_1318BB694A46__INCLUDED_)
